package com.example.demo.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * @ClassName SecondFilter
 * @Description SecondFilter  不用注解@WebFilter
 * @Author ZX
 * @Date 2020/5/26 9:48
 */
public class SecondFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("进入Second Filter...");
        filterChain.doFilter(servletRequest,servletResponse);
        System.out.println("离开Second Filter...");
    }

    @Override
    public void destroy() {

    }
}
